package dto;

public class Dto {
	
	boolean status;
	Object data;
	String errMsg;
	
	public boolean isStatus() {
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public Object getData() {
		return data;
	}
	public void setData(Object data) {
		this.data = data;
	}
	public String getErrMsg() {
		return errMsg;
	}
	public void setErrMsg(String errMsg) {
		this.errMsg = errMsg;
	}
	
	public static Dto getFinalDto(Dto dto){
		if(dto.errMsg!=null){
			dto.status = false;
			return dto;
		}
		
		dto.status = true;
		return dto;
	}

}
